/PROG  PNS0047
/ATTR
OWNER		= MNEDITOR;
COMMENT		= "53160691/93ZYL9";
PROG_SIZE	= 3362;
CREATE		= DATE 15-06-10  TIME 09:41:36;
MODIFIED	= DATE 25-02-25  TIME 21:58:52;
FILE_NAME	= PNS0018;
VERSION		= 0;
LINE_COUNT	= 117;
MEMORY_SIZE	= 3838;
PROTECT		= READ_WRITE;
TCD:  STACK_SIZE	= 0,
      TASK_PRIORITY	= 50,
      TIME_SLICE	= 0,
      BUSY_LAMP_OFF	= 0,
      ABORT_REQUEST	= 0,
      PAUSE_REQUEST	= 0;
DEFAULT_GROUP	= 1,*,*,*,*;
CONTROL_CODE	= 00000000 00000000;
/APPL
/MN
   1:  !******************************** ;
   2:  !     COSMA METAL FORMING  ;
   3:  !******************************** ;
   4:  !  LINE: CHINA CHANGSHA ;
   5:  !  ROBOT: R45 ;
   6:  !  PROGRAM: PNS0047 ;
   7:  !  PART:53160691/93  ;
   8:  !******************************** ;
   9:   ;
  10:  !INITIALIZE ;
  11:  MOVE TO HOME    ;
  12:  R[14:CG SENSETIVE]=90    ;
  13:  R[18:PICK TIME BEFORE]=1    ;
  14:  R[19:DROP TIME BEFORE]=.2    ;
  15:   ;
  16:  !------------------------------- ;
  17:  !BEGINNING OF PROGRAM ;
  18:  CALL PARTDROP    ;
  19:  COL GUARD ADJUST R[14] ;
  20:  UTOOL_NUM=1 ;
  21:  UFRAME_NUM=0 ;
  22:  PAYLOAD[3] ;
  23:  R[5:SPEED/SuDu]=10    ;
  24:  OVERRIDE=R[5:SPEED/SuDu] ;
  25:  !INITIATE TO PICK-POUNCE ;
  26:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  27:J P[2:PICK POUNCE] 50% CNT100 ACC100 BREAK    ;
  28:  PAUSE ;
  29:  R[1:CYCLE TOTAL]=0    ;
  30:  TIMER[1]=RESET ;
  31:  TIMER[1]=START ;
  32:   ;
  33:  LBL[10:TOP OF LOOF] ;
  34:  OVERRIDE=R[5:SPEED/SuDu] ;
  35:   ;
  36:  TIMER[3]=STOP ;
  37:  TIMER[2]=STOP ;
  38:  R[1:CYCLE TOTAL]=R[1:CYCLE TOTAL]+1    ;
  39:  R[2:LAST CYCLE TIME]=TIMER[2]    ;
  40:  R[3:LAST SPM]=60/R[2:LAST CYCLE TIME]    ;
  41:  R[8:R MOVE TIME]=TIMER[3]    ;
  42:  TIMER[2]=RESET ;
  43:  TIMER[2]=START ;
  44:  TIMER[3]=RESET ;
  45:   ;
  46:  !PROCEED TO PICK ;
  47:  LBL[20] ;
  48:  IF DI[1:P4 PICK ENTRY OK]=ON AND DI[3:FROM R34 CLEAR]=ON AND DI[8:P4 PICK START]=ON,JMP LBL[25] ;
  49:  IF DI[29:CYCLE STOP]=ON,JMP LBL[90] ;
  50:  JMP LBL[20] ;
  51:   ;
  52:  LBL[25] ;
  53:  WAIT DI[1:P4 PICK ENTRY OK]=ON AND DI[3:FROM R34 CLEAR]=ON AND DI[8:P4 PICK START]=ON    ;
  54:  R[5:SPEED/SuDu]=100    ;
  55:  TIMER[3]=START ;
  56:  OVERRIDE=R[5:SPEED/SuDu] ;
  57:J P[3:PICK APPROACH] 100% CNT100 ACC110    ;
  58:   ;
  59:J P[4:PICK] 100% CNT0 TB R[18]sec,CALL PARTPICK ACC110    ;
  60:  PAYLOAD[4] ;
  61:  CALL CHK_PICK    ;
  62:  MONITOR Z_CHECH ;
  63:J P[5:PICK DEPART] 100% CNT70 ACC110 TA R[20]sec,DO[5:TO R34 DROP START]=PULSE,1.0sec    ;
  64:  DO[8:P4 PARTS OUT]=PULSE,1.0sec ;
  65:  LBL[27] ;
  66:  CALL CHECKPICK    ;
  67:  IF DI[9:VACUUM ONL]=OFF OR DI[11:VACUUM ONR]=OFF,JMP LBL[27] ;
  68:J P[7:PICK CLEAR] 100% CNT100 ACC110    ;
  69:  LBL[30:GOTO DROP POUNCE] ;
  70:J P[8:DROP POUNCE] 100% CNT100 ACC110    ;
  71:  TIMER[3]=STOP ;
  72:  LBL[40:AT DROP POUNCE] ;
  73:  IF DI[2:P5 DROP ENTRY]=ON AND DI[4:FROM RU5 CLEAR]=ON AND DI[5:P5 DROP START]=ON,JMP LBL[80] ;
  74:  IF DI[7:PRESS STAMPING COMPLETE]=ON AND DI[2:P5 DROP ENTRY]=ON,JMP LBL[50] ;
  75:  IF DI[18:MOVE TO CLEAR POS]=ON,JMP LBL[60] ;
  76:  JMP LBL[40] ;
  77:   ;
  78:  LBL[50:MOVE DROP SNEAK] ;
  79:  TIMER[3]=START ;
  80:  OVERRIDE=R[5:SPEED/SuDu] ;
  81:J P[9:DROP SNEAK] 100% CNT100 ACC110    ;
  82:  LBL[51:DROP OR C-P-S] ;
  83:  IF DI[2:P5 DROP ENTRY]=ON AND DI[4:FROM RU5 CLEAR]=ON AND DI[5:P5 DROP START]=ON,JMP LBL[80] ;
  84:  IF DI[18:MOVE TO CLEAR POS]=ON,JMP LBL[40] ;
  85:  JMP LBL[51] ;
  86:  JMP LBL[50] ;
  87:   ;
  88:  LBL[60:MOVE CLS-PRS-ACC] ;
  89:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  90:  PAUSE ;
  91:  JMP LBL[30] ;
  92:   ;
  93:  LBL[80:DROP ENABLED] ;
  94:  TIMER[3]=START ;
  95:  !PROCEED TO DROP ;
  96:  OVERRIDE=R[5:SPEED/SuDu] ;
  97:J P[10:DROP APPROACH] 100% CNT50 ACC110    ;
  98:  MONITOR END Z_CHECH ;
  99:J P[11:DROP] 100% CNT5 TB R[19]sec,CALL PARTDROP ACC100    ;
 100:  DO[6:PART DROP COMPLETE]=PULSE,1.0sec ;
 101:  PAYLOAD[3] ;
 102:  CALL CHK_DROP    ;
 103:J P[12:DROP DEPART] 100% CNT100 ACC130 TA   0.00sec,DO[7:PRESS STAMPING START]=PULSE,1.0sec    ;
 104:J P[13:DROP CLEAR] 100% CNT100 ACC130    ;
 105:  !GOTO PICK POUNCE ;
 106:J P[2:PICK POUNCE] 100% CNT100 ACC100 BREAK    ;
 107:  IF DI[29:CYCLE STOP]=ON,JMP LBL[90] ;
 108:  JMP LBL[10] ;
 109:   ;
 110:  LBL[90:END OF CYCLE] ;
 111:  TIMER[1]=STOP ;
 112:  R[4:TOTAL CYCLE TIME]=TIMER[1]    ;
 113:  MONITOR END MON_PICK ;
 114:J P[1:MIDDLE] 50% CNT100    ;
 115:  MOVE TO HOME    ;
 116:   ;
 117:  LBL[100:END OF PROGRAM] ;
/POS
P[1:"MIDDLE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2086.456  mm,	Y =     -.007  mm,	Z = -1111.822  mm,
	W =  -180.000 deg,	P =     -.000 deg,	R =  -180.000 deg,
	E1=   107.700 deg
};
P[2:"PICK POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2022.475  mm,	Y =  1566.879  mm,	Z = -1184.490  mm,
	W =   179.325 deg,	P =     1.370 deg,	R =   150.801 deg,
	E1=   134.032 deg
};
P[3:"PICK APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2638.240  mm,	Y =  3225.744  mm,	Z = -1052.483  mm,
	W =   179.383 deg,	P =    -3.020 deg,	R =    89.850 deg,
	E1=   195.808 deg
};
P[4:"PICK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2638.240  mm,	Y =  3225.744  mm,	Z = -1195.363  mm,
	W =   179.383 deg,	P =    -3.020 deg,	R =    89.850 deg,
	E1=   195.808 deg
};
P[5:"PICK DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2638.240  mm,	Y =  3225.744  mm,	Z = -1000.643  mm,
	W =   179.383 deg,	P =    -3.020 deg,	R =    89.850 deg,
	E1=   195.808 deg
};
P[7:"PICK CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2171.385  mm,	Y =  1720.186  mm,	Z = -1033.416  mm,
	W =   178.245 deg,	P =     -.276 deg,	R =   140.271 deg,
	E1=   145.409 deg
};
P[8:"DROP POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2094.544  mm,	Y = -1199.982  mm,	Z = -1000.000  mm,
	W =  -179.999 deg,	P =      .013 deg,	R =  -154.305 deg,
	E1=    79.902 deg
};
P[9:"DROP SNEAK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2362.674  mm,	Y = -2486.205  mm,	Z =  -980.166  mm,
	W =  -179.533 deg,	P =     -.049 deg,	R =  -121.632 deg,
	E1=    47.155 deg
};
P[10:"DROP APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2648.165  mm,	Y = -3283.674  mm,	Z =  -950.000  mm,
	W =  -179.408 deg,	P =     -.650 deg,	R =   -92.521 deg,
	E1=    17.972 deg
};
P[11:"DROP"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2648.165  mm,	Y = -3283.674  mm,	Z = -1139.198  mm,
	W =  -179.408 deg,	P =     -.650 deg,	R =   -92.521 deg,
	E1=    17.972 deg
};
P[12:"DROP DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2648.165  mm,	Y = -3283.674  mm,	Z = -1016.000  mm,
	W =  -179.408 deg,	P =     -.650 deg,	R =   -92.521 deg,
	E1=    17.972 deg
};
P[13:"DROP CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2187.315  mm,	Y = -1442.818  mm,	Z = -1060.817  mm,
	W =  -178.950 deg,	P =      .528 deg,	R =  -145.914 deg,
	E1=    71.212 deg
};
/END
